package com.nf;

import com.nf.entity.Student;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class test {
    public static void main(String[] args){
        ApplicationContext ac = new ClassPathXmlApplicationContext("applicationContext.xml");
        Student s = (Student) ac.getBean("studentB");
        System.out.println(s.getName()+","+s.getAge()+","+s.getCar().getName());
    }
}
